WASTE is a text editing library for Macintosh programmers.
Designed to be a viable replacement for TextEdit, WASTE offers several enhancements, the major one being the ability to handle text files larger than 32K.
Like TextEdit, WASTE handles multi-styled text and relies on the services offered by the Script Manager for drawing, measuring and hit-testing the text and for finding word and line breaks. The built-in support for inline input makes WASTE fully WorldScript II-compliant (on the other hand, bidirectional scripts, like Arabic, are not supported).
For the latest news about WASTE, look up this web page:
<URL:http://cirrus.sprl.umich.edu/waste>
For the latest updates, contact the official WASTE ftp site, which is currently:
<URL:ftp://ftp.dsi.unimi.it/DSI/piovanel/waste/>
This document is provided mainly to give you an opportunity to play with the WASTE Demo application; the real documentation is in a separate file in Acrobat format.
The pascal sources for WASTE and for a demo application can be compiled with any of the following compilers (and possibly others as well):
• THINK Pascal 4.0.x
• Metrowerks Pascal 68K
• Metrowerks Pascal PPC
The sources are based on the latest Universal Pascal Interfaces from Apple (version 2.1), which don’t support the old glorious THINK compiler, but I have included modified UPIs that work with THINK Pascal.
Changes from version 1.1
• Upgraded to CW7 and to version 2.1 of the Universal Pascal Interfaces.
• Fixed a bug in the WASTE Demo that would cause a crash on pre-7.1 system software.
• Fixed a minor scrolling problem (thanks to Nigel Stanger).
• Updated some URLs.
• Made some slight changes to the header/interface files.
• The documentation is now in Acrobat™ format.
Changes from version 1.0
There are many significant changes from version 1.0, including:
• Embedded objects. WASTE 1.1 lets you embed pictures and other objects in the text as if they were ordinary glyphs.
• Built-in support for the Drag Manager.
• Built-in undo.
• Low-level hooks for drawing and measuring text. Although these hooks are still undocumented, the WASTE Demo application contains sample code showing how these hooks can be used to implement real tabs.
CWASTE and the CWASTEText Classes
Dan Crevier (<URL:mailto:dan@rhino.harvard.edu>) wrote CWASTE, a straight port of WASTE to C and the CWASTEText Classes, a set of wrapper C++ classes for WASTE, to be used in conjunction with the THINK Class Library (version 2.0.3 or newer). Both items are available from:
<URL:ftp://rhino.harvard.edu/pub/dan/WASTE/>
CWASTE includes some enhancements contributed by other developers not found in the current Pascal version.
WASTE Mailing List
A simple, informal mailing list has been set up to keep in touch developers working with/on WASTE. To join the list, send a request to:
<URL:mailto:waste-request@umich.edu>
To post a message to the list, send it to:
<URL:mailto:waste@umich.edu>
Finally, to list the members of the mailing list, finger the above address.
WASTE Web Page
There is also a WWW page dedicated to WASTE, kindly maintained by Alan Steremberg (<URL:mailto:alans@umich.edu>) and Dan Crevier:
<URL:http://cirrus.sprl.umich.edu/waste>
Internet Config
The WASTE Demo supports command clicking of URLs using Internet Config 1.1, which you can download from:
There seems to be a bug in the WorldScript™ Power Adapter that causes GetScriptManagerVariable(smDoubleByte) to always return 0 when called from PowerPC code, even if a double-byte system is installed. WASTE may work incorrectly because of this bug.
I think the WorldScript™ II extension that comes with the WorldScript Update 7.5.1 v1.0 package fixes this bug and, being fat, it should also make the Power Adapter obsolete.
Author’s Address
My address is:
Marco Piovanelli
Mail: 26, via del Sebino — I-25126 Brescia — Italy